package com.xpchenfrank.controller;

import com.xpchenfrank.mapper.WsmCarMapper;
import com.xpchenfrank.service.BlogService;
import com.xpchenfrank.service.StockService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 捕获博客信息的controller
 *
 * @author xpchen
 * @time 2018/3/7 17:50
 * @Description
 * @copyright Wuxi Yazuo ,Ltd.copyright 2015-2025
 */
@Slf4j
@RestController
@RequestMapping("blog")
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class BlogController {

    @Resource
    BlogService blogService;

    @Resource
    TestBusinessImpl testBusiness;

    @ResponseBody
    @RequestMapping(value = "/check", method = RequestMethod.GET)
    public String check() {
        String findStr = blogService.getCSDNBlog();

        testBusiness.hurryUp();

        return findStr;
    }

    @ResponseBody
    @RequestMapping(value = "/normal", method = RequestMethod.GET)
    public String normal() {
        return "我就是个正常的接口，我不调用任何东西";
    }
}
